package com.ruoyi.board.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.board.mapper.MessageBoardMapper;
import com.ruoyi.board.domain.MessageBoard;
import com.ruoyi.board.service.IMessageBoardService;

/**
 * 留言表Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-29
 */
@Service
public class MessageBoardServiceImpl implements IMessageBoardService 
{
    @Autowired
    private MessageBoardMapper messageBoardMapper;

    /**
     * 查询留言表
     * 
     * @param MessageId 留言表主键
     * @return 留言表
     */
    @Override
    public MessageBoard selectMessageBoardByMessageId(Long MessageId)
    {
        return messageBoardMapper.selectMessageBoardByMessageId(MessageId);
    }

    /**
     * 查询留言表列表
     * 
     * @param messageBoard 留言表
     * @return 留言表
     */
    @Override
    public List<MessageBoard> selectMessageBoardList(MessageBoard messageBoard)
    {
        return messageBoardMapper.selectMessageBoardList(messageBoard);
    }

    /**
     * 新增留言表
     * 
     * @param messageBoard 留言表
     * @return 结果
     */
    @Override
    public int insertMessageBoard(MessageBoard messageBoard)
    {
        return messageBoardMapper.insertMessageBoard(messageBoard);
    }

    /**
     * 修改留言表
     * 
     * @param messageBoard 留言表
     * @return 结果
     */
    @Override
    public int updateMessageBoard(MessageBoard messageBoard)
    {
        return messageBoardMapper.updateMessageBoard(messageBoard);
    }

    /**
     * 批量删除留言表
     * 
     * @param MessageIds 需要删除的留言表主键
     * @return 结果
     */
    @Override
    public int deleteMessageBoardByMessageIds(Long[] MessageIds)
    {
        return messageBoardMapper.deleteMessageBoardByMessageIds(MessageIds);
    }

    /**
     * 删除留言表信息
     * 
     * @param MessageId 留言表主键
     * @return 结果
     */
    @Override
    public int deleteMessageBoardByMessageId(Long MessageId)
    {
        return messageBoardMapper.deleteMessageBoardByMessageId(MessageId);
    }
}
